package com.teemor.tim.rest;

import com.teemor.tim.bean.form.openim.ImportMsgForm;
import com.teemor.tim.bean.form.openim.SendMsgForm;
import com.teemor.tim.bean.result.openim.ImportMsgResult;
import com.teemor.tim.bean.result.openim.SendMsgResult;
import com.teemor.tim.rest.model.RestParam;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.cloud.openfeign.SpringQueryMap;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

/**
 * @ename zhoulk
 * @cname 周李科
 * @date 2020/12/14 13:49
 */
@FeignClient(value = "openim", url = "https://console.tim.qq.com/v4/openim")
public interface OpenimFeignClient {

    @PostMapping(value = "/importmsg")
    ImportMsgResult importMsg(@SpringQueryMap RestParam param, @RequestBody ImportMsgForm form);


    @PostMapping(value = "/sendmsg")
    SendMsgResult sendMsg(@SpringQueryMap RestParam param, @RequestBody SendMsgForm form);

}
